curDate = ""
sntp.sync(
    {
        "ntp.ntsc.ac.cn",
        "cn.ntp.org.cn",
        "s1c.time.edu.cn",
        "s1b.time.edu.cn",
        "ntp.myhuaweicloud.com",
        "ntp1.aliyun.com",
        "ntp2.aliyun.com",
        "ntp3.aliyun.com",
        "ntp4.aliyun.com",
        "ntp5.aliyun.com",
        "cn.pool.ntp.org"
    },
    function(sec, usec, server, info)
        sec = sec + (8 * 3600)
        time = rtctime.epoch2cal(sec)
        curDate = string.format("%04d%02d%02d%02d", time["year"], time["mon"], time["day"], time["hour"])
        dofile("hwmqtt.lua")
    end,
    function()
        curDate = "2020050510"
        print("ntp failed!")
    end
)
